package com.bookstore.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;

@Data
@TableName("address")
@ApiModel(description = "收货地址信息")
public class Address {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("地址ID")
    private Integer addressId;

    @ApiModelProperty("用户ID")
    private Integer userId;

    @ApiModelProperty("收货人姓名")
    private String receiverName;

    @ApiModelProperty("收货人电话")
    private String receiverPhone;

    @ApiModelProperty("省份")
    private String province;

    @ApiModelProperty("城市")
    private String city;

    @ApiModelProperty("区县")
    private String district;

    @ApiModelProperty("详细地址")
    private String detailAddress;

    @ApiModelProperty("邮政编码")
    private String postalCode;

    @ApiModelProperty("是否默认地址")
    private Boolean isDefault;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;
} 